package com.work.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the Tasks database table.
 * 
 */
@Entity
@Table(name="Tasks")
@NamedQuery(name="Task.findAll", query="SELECT t FROM Task t")
public class Task implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idTasks;
	private Date creationDate;
	private Date endDate;
	private Date startDate;
	private int status;
	private Date updatedDate;
	private Sprint sprintBean;
	private User userTasks;
	private User userCreatedBy;
	private User userUpdatedBy;

	public Task() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getIdTasks() {
		return this.idTasks;
	}

	public void setIdTasks(int idTasks) {
		this.idTasks = idTasks;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}


	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}


	@Temporal(TemporalType.TIMESTAMP)
	public Date getUpdatedDate() {
		return this.updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}


	//bi-directional many-to-one association to Sprint
	@ManyToOne
	@JoinColumn(name="sprint")
	public Sprint getSprintBean() {
		return this.sprintBean;
	}

	public void setSprintBean(Sprint sprintBean) {
		this.sprintBean = sprintBean;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="User")
	public User getUserTasks() {
		return this.userTasks;
	}

	public void setUserTasks(User userTasks) {
		this.userTasks = userTasks;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="CreatedBy")
	public User getUserCreatedBy() {
		return this.userCreatedBy;
	}

	public void setUserCreatedBy(User userCreatedBy) {
		this.userCreatedBy = userCreatedBy;
	}


	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="UpdatedBy")
	public User getUserUpdatedBy() {
		return this.userUpdatedBy;
	}

	public void setUserUpdatedBy(User userUpdatedBy) {
		this.userUpdatedBy = userUpdatedBy;
	}

}